diff --git a/sklearn/calibration.py b/sklearn/calibration.py
index 2fcccab7e..61a54fd0c 100644
--- a/sklearn/calibration.py
+++ b/sklearn/calibration.py
@@ -519,7 +519,7 @@ class _SigmoidCalibration(BaseEstimator, RegressorMixin):
         return expit(-(self.a_ * T + self.b_))
 
 
-def calibration_curve(y_true, y_prob, normalize=False, n_bins=5):
+def calibration_curve(y_true, y_prob, normalize=False, bins=5):
     """Compute true and predicted probabilities for a calibration curve.
 
      The method assumes the inputs come from a binary classifier.
@@ -541,10 +541,11 @@ def calibration_curve(y_true, y_prob, normalize=False, n_bins=5):
         a proper probability. If True, the smallest value in y_prob is mapped
         onto 0 and the largest one onto 1.
 
-    n_bins : int
-        Number of bins. A bigger number requires more data. Bins with no data
-        points (i.e. without corresponding values in y_prob) will not be
-        returned, thus there may be fewer than n_bins in the return value.
+    bins : int or array-like, shape (n_bins,)
+        Number of bins or the bin edges to be used. If bins is an integer, it
+        defines the number of equal-width bins in the range [0, 1]. If bins is
+        an array, it defines the bin edges allowing for non-uniform width of
+        bins.
 
     Returns
     -------
@@ -572,7 +573,11 @@ def calibration_curve(y_true, y_prob, normalize=False, n_bins=5):
 
     y_true = _check_binary_probabilistic_predictions(y_true, y_prob)
 
-    bins = np.linspace(0., 1. + 1e-8, n_bins + 1)
+    if isinstance(bins, int):
+        bins = np.linspace(0., 1. + 1e-8, bins + 1)
+    else:
+        bins = np.array(bins)
+
     binids = np.digitize(y_prob, bins) - 1
 
     bin_sums = np.bincount(binids, weights=y_prob, minlength=len(bins))
